(cl:in-package #:sicl-data-and-control-flow)

(symbol-macrolet ((c sicl-client:*client*))
  (let ((e env:*environment*))
    (defun fdefinition (function-name)
      (cond ((env:special-operator c e name)
             :special-operator)
            ((not (null (env:macro-function c e name)))
             :macro)
            (t (let ((function (env:fdefinition c e name)))
                 (if (null function)
                     (error 'undefined-function :name function-name)
                     function)))))))
